package com.njupt.webapp.tags;

import org.springframework.jdbc.core.JdbcTemplate;


public class SqlBaseTag extends ApplicationContextTag{

	protected String scope;
	/** 有时一个项目可能会同时操作多个数据库 */
	protected String templateId = "jdbcTemplate";
	protected String sql;
	public String getScope() {
		return scope;
	}
	public void setScope(String scope) {
		this.scope = scope;
	}
	public String getTemplateId() {
		return templateId;
	}
	public void setTemplateId(String templateId) {
		this.templateId = templateId;
	}
	public String getSql() {
		return sql;
	}
	public void setSql(String sql) {
		this.sql = sql;
	}	
	
	protected JdbcTemplate getTemplate(){
		return (JdbcTemplate) this.getBean(templateId);
	}
}
